This invention relates to the field of computer systems. More particularly, a system and methods are provided for caching data on a mobile device.
Applications operated on mobile devices (e.g., laptop computers, personal digital assistants, mobile telephones) have generally been designed for either online or offline use. Both types of mobile applications tend to use some form of browser to interact with a user. Online applications enjoy continual access to an enterprise server (e.g., central database server). Offline applications, in contrast, operate with minimal or no contact with an enterprise server.
More specifically, an online mobile application can access data on the enterprise server whenever needed, thereby possibly obviating any need to store data locally. However, because of the “always connected” nature of an online mobile application, connection costs (e.g., for wireless air time) can be quite high.
Also, an online mobile application generally suffers from unpredictable latency. When the online application transmits a request to the server, the response time depends upon the level of usage of the mobile device's wireless network in addition to any congestion at the server. Further, usage of the online application may be geographically limited, depending on the extent of the wireless network, and may be prohibited in some locations (e.g., airplanes, hospitals).
Yet further, online mobile applications often access data in sets, such as entire web pages, data tables, etc. When a data item needs to be replaced, the entire dataset may be replaced rather than just the one item. This can be inefficient and increase the cost of operating the application.
One reason mobile applications tend to access data in sets (e.g., entire web pages), is that the data are tightly coupled to the presentation of the data. In particular, when data are copied or downloaded to a client device for a mobile application, each collection of data (e.g., a table, a set of database rows or fields) is typically conveyed within the page in which it will be displayed. Thus, the data cannot be displayed on the client except in that page. Because each set or collection of data may be stored with a full display page, and many pages may be identical except for their encapsulated data, much storage on the client may be wasted.
In contrast to an online application, an offline mobile application does not enjoy continual access to data maintained by the enterprise server. Some data (e.g., a snapshot) from an enterprise server may be copied onto or replicated on a mobile device. Although the offline application may always be usable (e.g., when offline from the enterprise server), it will not always have fresh data, and it can only access data that were copied to it.
An offline mobile application configured to use data snapshots is usually required to synchronize its stored, offline data with an enterprise server on an occasional or periodic basis (e.g., once per day). The frequency of synchronization is generally unrelated to the frequency with which data items are accessed or modified on the mobile device. Thus, many transactions or operations may be performed on the mobile device using stale data. And, synchronization may entail high overhead, as a large amount of data will often be exchanged—even data that have not changed and do not need to be refreshed. For example, an entire web page or set of web pages may be downloaded or exchanged even though only one data item in a page needs to be updated.
Because of the infrequent rate of data synchronization, offline mobile applications are not suitable for use with data that are highly dynamic. In addition, an offline mobile application is often required to maintain a transaction log of all data changes made by the application, in order to facilitate synchronization.
In general, enterprise data stored on a mobile device, for use with a mobile application, may have varying longevity. Some data points or items may be valid for long periods of time (e.g., a product description, an address); other data points or items may be invalid after only a relatively short period of time (e.g., a stock quote, a currency conversion rate). Existing mobile applications and client databases typically are not configured to recognize or consider the longevity of downloaded data.
Further, mobile client applications that attempt to provide significant functionality to users tend to require robust software and/or hardware configurations (e.g., a Java Virtual Machine, an HTTP listener, a servlet engine). Such requirements prevent the use of smaller, more restrained client devices, such as Personal Digital Assistants (PDA) or smart telephones, and also add overhead to client operations.